import React, {Component} from 'react';
import {toggleSideMenu} from "redux/action/app";
import {connect} from "react-redux";
import {withRouter} from "react-router";

interface IWelcomeInfoState{
}
class WelcomeInfo extends Component<any,IWelcomeInfoState> {

    render() {
        return (
            <span>欢迎<b>{this.props.userInfo?.username}</b>进入！</span>
        );
    }
}


const mapStateToProps=(state:any)=>{
    return state.app
}

const mapDispatchToProps={toggleSideMenu}

const WithConnect=connect(mapStateToProps,mapDispatchToProps)(WelcomeInfo)
export default withRouter(WithConnect)

